https://leetcode.cn/problems/count-and-say/description/
class Solution {
public:
    string countAndSay(int n) {
        string ret="1";
        //从1开始往后计算n次
        for(int i=1;i<n;i++)
        {
            string tmp;
            int left=0,right=0;
            while(right<ret.size())
            {
                while(right<ret.size()&&ret[right]==ret[left])
                    right++;
                tmp+=to_string(right-left);
                tmp+=ret[left];
                left=right;
                
            }
            ret=tmp;   
        }
        return ret;
    }
};